/*
 * @(#)PageTag.java $version 2012-3-5
 * 
 * Copyright 2011 RogueDevelopment Gruop. All rights Reserved.
 * ROGUEDEVELOPMENT PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.nado.extensions.pagination;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;

/**
 * @author LEESUNG
 * 
 */
public abstract class PageTag extends SimpleTagSupport {
	@Override
	public void doTag() throws JspException, IOException {
		PaginationTag parent = (PaginationTag) getParent();
		PaginationInfo info = parent.getPaginationInfo();
		PaginationTemplate tmpl = parent.getPaginationTemplate();
		String output = render(info, tmpl);
		getJspContext().getOut().print(output);
	}

	protected abstract String render(PaginationInfo paramPaginationInfo,
			PaginationTemplate paramPaginationTemplate);
}
